package com.zxy.ziems.server.device.pojo.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Null;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 设备属性配置告警类型
 * @author 10348359
 * @create 2024-03-28 9:51
 */

@Data
public class DevicePropertyAlarmDTO {
    /**
     * 主键
     */
    @NotBlank(message = "主键ID不能为空", groups = {Update.class, Delete.class})
    @Null(message = "主键ID必须为空", groups = {Add.class})
    private String id;

    /**
     * 设备Id
     */
    @NotBlank(message = "设备ID不能为空", groups = {Update.class, Add.class})
    private String deviceId;

    /**
     * 设备属性Id
     */
    @NotBlank(message = "设备属性ID不能为空", groups = {Update.class, Add.class})
    private String devicePropertyId;

    /**
     * 告警类型
     */
    @NotBlank(message = "告警类型不能为空", groups = {Update.class, Add.class})
    private String alarmTypeId;

    /**
     * 值上限
     */
    private BigDecimal maxValue;

    /**
     * 值下限
     */
    private BigDecimal minValue;

    /**
     *  1是生效
     *  0 是不生效
     */
    private Integer enableStatus = 1;

    /**
     * 描述
     */
    private String description;

    public interface Add{}
    public interface Update{}
    public interface Delete {}
}
